<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.vsg.stock.core.domain.mybatis.StockCategoryProxy">


	<resultMap id="StockCategoryResult" type="org.vsg.stock.core.domain.mybatis.StockCategoryProxy">
		<id property="id" column="ID_CATEGORY" />
		<result property="type" column="TYPE"/>
		<result property="description" column="DESCRIPTION"/>
	</resultMap>

<!-- 
	<insert id="insertExrights" 
		parameterType="org.vsg.stock.core.domain.ExRights">
		insert into STOCK_EX_RIGHT 
			(STOCK_CODE , REGISTER_DATE , CIRCULATION_DATE, DEDUCTION_DATE, BONUS_DATE , REMARK)
		values 
			(#{id.stockCode} , #{id.registerDate}, #{circulationDate},#{deductionDate},#{bonusDate} , #{remark})
	</insert>
 -->

	<select id="findAll"  resultMap="StockCategoryResult">
    	select ID_CATEGORY , TYPE , DESCRIPTION from CATEGORY order by DESCRIPTION 
  	</select>	

	<select id="findAllDescription"  resultType="string">
    	select DESCRIPTION from CATEGORY order by DESCRIPTION 
  	</select>

	<select id="findAllMapKeys"  resultType="string">
    	select ID_CATEGORY||','||STOCK_CODE from STOCK_CATEGORY_MAP order by ID_CATEGORY ,STOCK_CODE
  	</select>

</mapper>
